var settings = new Array();
settings["interval"] = {value:120,comment:"seconds",type:"int",text:"Update interval"};
settings["autologin"] = {value:false,comment:"'Save email and password'-option required at the login page",type:"bool",text:"Auto login"};


function loadSettings(){
    for(var key in settings){
        if(!localStorage.getItem(key)){
            localStorage.setItem(key,settings[key].value);
        }
        else{
            settings[key].value = localStorage.getItem(key);
            console.log(key + " loaded");
        }
    }
}
function saveSettings(){
    for(var key in settings){
        localStorage.setItem(key,settings[key].value);
        console.log(key + " saved");
    }
}
